﻿<%@ Page Language="C#" MasterPageFile="~/Masterlayout.master" AutoEventWireup="true" CodeFile="Customer.aspx.cs" Inherits="Customer2" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<title>Customers Page</title>
    <style type="text/css">
        LinkButton
        {
        	
        }
        .gv
        {
        	border:2px solid #456879;
	        border-radius:20px;
	        width:742px;
	
        }
        .tb5 {
	        border:2px solid #456879;
	        border-radius:10px;
	        height: 22px;
	        width: 230px;
             margin-left: 0px;
            
          }
        .td1
        {
            height: 35px;
        }
        .style1
        {
        height: 35px;
        width: 70px;
        margin-left: 200px;
    }
        .style3
      {
          height: 35px;
          width: 137px;
          margin-left: 200px;
      }
        .stylebtn
      {
      	border-width:1px;
      	height: 35px;
      	width:100px;
      }
        .style4
      {
          height: 35px;
          width: 133px;
          margin-left: 200px;
      }
      .style5
      {
          height: 35px;
          width: 97px;
          margin-left: 200px;
      }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    
    <table>
<tr>
<td>
<table margin-left: 160px style="width: 558px; margin-left: 40px;">



    <tr style="margin-left: 200px">
        
        <td class="style5" >
            <asp:Label ID="ID" runat="server" Width="53px">ID</asp:Label>
        </td>
        <td style="margin-left: 120px">
            <asp:TextBox ID="txtID" runat="server" Width="247px" class="tb5" Enabled="false"></asp:TextBox>
        </td>
    </tr>
     <tr style="margin-left: 200px">
        
        <td class="style5" >
            <asp:Label ID="Label1" runat="server" Width="129px">Company Name</asp:Label>
        </td>
        <td style="margin-left: 120px">
            <asp:TextBox ID="txtCompanyname" runat="server" Width="247px" class="tb5"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                ControlToValidate="txtCompanyname" ErrorMessage="Company Name Reuired"></asp:RequiredFieldValidator>
        </td>
    </tr>
     <tr style="margin-left: 200px">
        
        <td class="style5" >
            <asp:Label ID="Label2" runat="server" Width="107px">Contact Name</asp:Label>
        </td>
        <td style="margin-left: 120px">
            <asp:TextBox ID="txtContactName" runat="server" Width="247px" class="tb5"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                ControlToValidate="txtContactName" ErrorMessage="Contact Name Require"></asp:RequiredFieldValidator>
        </td>
    </tr>
     <tr style="margin-left: 200px">
        
        <td class="style5" >
            <asp:Label ID="Label3" runat="server" Width="116px">Contact Title</asp:Label>
        </td>
        <td style="margin-left: 120px">
            <asp:TextBox ID="txtContacttitle" runat="server" Width="247px" class="tb5"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                ControlToValidate="txtContacttitle" ErrorMessage=" Contact Title Require"></asp:RequiredFieldValidator>
        </td>
    </tr>
     <tr style="margin-left: 200px">
        
        <td class="style5" >
            <asp:Label ID="Label4" runat="server" Width="53px">Address</asp:Label>
        </td>
        <td style="margin-left: 120px">
            <asp:TextBox ID="txtAddress" runat="server" Width="247px" class="tb5"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                ControlToValidate="txtAddress" ErrorMessage="Addres Require"></asp:RequiredFieldValidator>
        </td>
    </tr>
     <tr style="margin-left: 200px">
        
        <td class="style5" >
            <asp:Label ID="Label5" runat="server" Width="53px">City</asp:Label>
        </td>
        <td style="margin-left: 120px">
            <asp:TextBox ID="txtCity" runat="server" Width="247px" class="tb5"></asp:TextBox>
            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                ControlToValidate="txtCity" ErrorMessage="City Require"></asp:RequiredFieldValidator>
        </td>
    </tr>
      </table>
      
      </td>
      <td>
      <table style="height: 251px; width: 498px">
      <tr>
      <td class="style1">
            <asp:Label ID="Label7" runat="server" >Region</asp:Label>
            </td>
            <td class="style1">
            <asp:TextBox ID="txtRegion" runat="server" class="tb5" Width="247px" ></asp:TextBox>
            </td>
            </tr>
             <tr>
      <td class="style1">
            <asp:Label ID="Label6" runat="server" >Postal Code</asp:Label>
            </td>
            <td>
            <asp:TextBox ID="txtposCode" runat="server" class="tb5" Width="247px"></asp:TextBox>
            </td>
            </tr>
            <tr>
      <td class="style1">
            <asp:Label ID="Label8" runat="server" >Country</asp:Label>
            </td>
            <td>
            <asp:DropDownList ID="DDLCountry" runat="server" class="tb5" Width="247px"></asp:DropDownList>
            </td>
            </tr>
           <tr>
      <td class="style1">
            <asp:Label ID="Label9" runat="server" >Fax</asp:Label>
            </td>
            <td>
            <asp:TextBox ID="txtFax" runat="server" class="tb5" Width="247px" placeholder="Fax format must follow (999)-999-9999"></asp:TextBox>
            
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="txtFax" Display="Dynamic" EnableTheming="True" 
                    ErrorMessage="Fax not accept" 
                    ValidationExpression="^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$"></asp:RegularExpressionValidator>
            
            </td>
            </tr>
           <tr>
      <td class="style1">
            <asp:Label ID="Label10" runat="server" >Phone</asp:Label>
            </td>
            <td>
            <asp:TextBox ID="txtPhone" runat="server" class="tb5" Width="247px" placeholder="Phone format must follow (999)-999-9999"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" 
                    ControlToValidate="txtPhone" ErrorMessage="Phone Require" ></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                    ControlToValidate="txtPhone" ErrorMessage="Phone is not accept" 
                    ValidationExpression="^(\+\d{1,2}\s)?\(?\d{3}\)?[\s.-]\d{3}[\s.-]\d{4}$"></asp:RegularExpressionValidator>
            </td>
            </tr>
        
      </table>
      </td>
      </tr>
      <table style="margin-left: 80px" class="style3">
      <table style="margin-left: 160px">
      <tr>
            <td class="stylebtn">
                <asp:Button runat="server" ID="btnReload" Text="RELOAD" 
              class="tb5" Width="147px"  CausesValidation="false" 
                    onclick="btnReload_Click"   /> </td>
            <td class="stylebtn">
                <asp:Button runat="server" ID="btnInsert" Text="INSERT" 
               class="tb5" Width="147px" onclick="btnInsert_Click"/> </td>
            <td class="stylebtn">
                <asp:Button runat="server" ID="btnUpdate" Text="UPDATE" 
                    class="tb5" Width="147px" onclick="btnUpdate_Click"  /> </td>
            <td class="stylebtn"><asp:Button runat="server" ID="btnDelete" Text="DELETE" 
                    class="tb5" Width="147px"  
                    onclick="btnDelete_Click" OnClientClick="return confirm('Are you sure to Delete?')" Enabled="false" /> </td>
            <td class="stylebtn"><asp:Button runat="server" ID="btnNew" Text="NEW" 
                    class="tb5" Width="147px" CausesValidation="false" 
                    onclick="btnNew_Click" /> </td>
            </tr>
      </table>
      </tr>
      <table style="margin-left: 80px">
      <tr>
        <td class="style4">
                <asp:TextBox ID="txtSearch" runat="server" placeholder="Enter search key" 
             class="tb5" Width="385px"></asp:TextBox>
        <asp:Button ID="btnsearch" runat="server" Text="SEARCH BY CONTACT NAME" class="tb5" 
                    Width="274px" onclick="btnsearch_Click" CausesValidation="false" 
            />
            
            </td>
            
        
      
      </tr>
      <tr>
        <td>
             <asp:RadioButtonList ID="RBLFilter" runat="server" AutoPostBack="true"
                        RepeatDirection ="Horizontal" Width="208px" Height="16px" onselectedindexchanged="RBLFilter_SelectedIndexChanged" 
                                 >
                            <asp:ListItem >Title</asp:ListItem>
                            <asp:ListItem>Country</asp:ListItem>
                        </asp:RadioButtonList>
                         <asp:DropDownList ID="ddlFilter" runat="server" AutoPostBack="true" 
                            style="width:150px" Height="35px" Width="159px" 
                 onselectedindexchanged="ddlFilter_SelectedIndexChanged1" >
                        </asp:DropDownList>
        </td>
      </tr>
    <tr style="margin-left: 40px">
    <td style="margin-left: 120px" class="style4">
    <asp:GridView ID="gvCustomer" runat="server" Width="923px"
    
    class="gv"
    BackColor="White"
    ForeColor="Black"
    SelectedRowStyle-ForeColor="White"
            AutoGenerateSelectButton="True" Height="201px" 
            onpageindexchanging="gvCustomer_PageIndexChanging" 
            onselectedindexchanged="gvCustomer_SelectedIndexChanged" >
            <HeaderStyle BackColor="Orange" />
        <EditRowStyle ForeColor="Black" />
        <AlternatingRowStyle BackColor="DarkGray" />
        <SelectedRowStyle BackColor="BlueViolet" />
        </asp:GridView>
    </td>
    </tr>
    <tr>
    <td style="margin-left: 120px" class="style4">
        <asp:GridView ID="gvresult" runat="server" Width="923px"
        
        class="gv"
        BackColor="White"
        ForeColor="Black"
        SelectedRowStyle-ForeColor="White"
            AutoGenerateSelectButton="True" Height="229px" onselectedindexchanged="gvresult_SelectedIndexChanged" 
>
            <HeaderStyle BackColor="Orange" />
        <EditRowStyle ForeColor="Black" />
        <AlternatingRowStyle BackColor="DarkGray" />
        <SelectedRowStyle BackColor="BlueViolet" />
       
        
        </asp:GridView>
        </td>
    </tr>
   
    
    </table>
    </table>
      
</table>

</asp:Content>

